import java.util.LinkedList;
import java.util.List;

public class Utility{
    private List<String> reserved_words;
    public Utility(String [] words){
	this.reserved_words = new LinkedList<String>();
	for(int i=0; i<words.length; i++)
	    reserved_words.add(words[i]);
    }
    public boolean isReservedWord(String st){
	return reserved_words.contains(st);
    }
    public String getReservedWord(String st){
	String rw="";
	if(isReservedWord(st)){
	    rw=reserved_words.get(reserved_words.indexOf(st));
	}
	return rw;
    }
    public int getIndexOfReservedWord(String st){
	int rw=-1;
	if(isReservedWord(st)){
	    rw=reserved_words.indexOf(st);
	}
	return rw;
    }
}
